﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace hud_lib
{
    public class CLabel : CItem
    {
        public CLabel(Point position, Point size, SpriteFont font, GraphicsDevice graphicsDevice)
            : base(position, size)
        {
            m_font = font;
            m_batch = new SpriteBatch(graphicsDevice);
        }

        public void Draw(string text, Color color)
        {
            m_batch.Begin();
            m_batch.DrawString(m_font, text, new Vector2(m_position.X, m_position.Y), color);
        }

        private SpriteFont m_font;
        private SpriteBatch m_batch;
    }
}
